//particles.cpp

//#include "stdafx.h"
#include "particles.h"

//constructor
//--------------------------------------------------------------
Particle::Particle() {
	this->id = -1;
	this->cellId = -1;

	this->vx = 0;
	this->vy = 0;
	this->vz = 0;

	this->externalFx = 0;
	this->externalFy = 0;
	this->externalFz = 0;
}

//constructor with parameters
//--------------------------------------------------------------
Particle::Particle( double x, double y, double z, int id, int cellId ) {
	
	this->id = id;
	this->cellId = cellId;

	this->x = x;
	this->y = y;
	this->z = z;

	this->vx = 0;
	this->vy = 0;
	this->vz = 0;

	this->externalFx = 0;
	this->externalFy = 0;
	this->externalFz = 0;
}

//destructor
//--------------------------------------------------------------
Particle::~Particle() {

}


//set new position of particle
//--------------------------------------------------------------
void Particle::setPosition(double x, double y, double z) {
	this->x = x;
	this->y = y;
	this->z = z;
}

//set new velocity 
//--------------------------------------------------------------
void Particle::setVelocity( double vx, double vy, double vz ) {
	this->vx = vx;
	this->vy = vy;
	this->vz = vz;
}


//set external forces 
//--------------------------------------------------------------
void Particle::setExternalForce(double fx, double fy, double fz ) {
	this->externalFx = fx;
	this->externalFy = fy;
	this->externalFz = fz;
}

//return id of particle 
//--------------------------------------------------------------
int Particle::getId() {
	return this->id;
}
	
//return id of cell in which particle is located 
//--------------------------------------------------------------
int Particle::getCellId() {
	return this->cellId;
}



//get x coordinate 
//--------------------------------------------------------------
double Particle::getX() {
	return this->x;
}

//get y coordinate 
//--------------------------------------------------------------
double Particle::getY() {
	return this->y;
}

//get z coordinate 
//--------------------------------------------------------------
double Particle::getZ() {
	return this->z;

}


//get x component of velocity vector 
//--------------------------------------------------------------
double Particle::getVx() {
	return this->vx;
}


//get y component of velocity vector 
//--------------------------------------------------------------
double Particle::getVy() {
	return this->vy;
}


//get z component of velocity vector 
//--------------------------------------------------------------
double Particle::getVz() {
	return this->vz;
}


//get x component of external force vector 
//--------------------------------------------------------------
double Particle::getExtFx() {
	return this->externalFx;
}

//get y component of external force vector 
//--------------------------------------------------------------
double Particle::getExtFy() {
	return this->externalFy; 
}

//get z component of external force vector
//--------------------------------------------------------------
double Particle::getExtFz() {
	return this->externalFz;
}


//end of particles.cpp